<? 
define('ROOT', $_SERVER['DOCUMENT_ROOT']);
require_once(ROOT.'/public/global.php');
require_once(ROOT.'/lang/'.$LN.'.php');
$code = $_GET['code'];
$pages = array('basic', 'remote', 'custom', 'ctxMenu');
if (!in_array($code, $pages))
	$code = 'basic';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<? require_once(ROOT.'/public/ref.php'); ?>
<title><?=$MsgJs[$code.'Tabs'] ?></title>
<meta name="description" content="<?=$MsgJs[$code.'Tabs'] ?>" />
<meta name="keywords" content="JQuery Tabs Plugin" />
<script type="text/javascript" src="/js/mac/webapp.min.js"></script>
<link href="/css/default/mac/tabs/tabs.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/mac/tabs.min.js"></script>
<script type="text/javascript">
$(function(){
	$('#nav_jump').change(function(){
		location = './' + this.value + '.html';
	}).val('<?=$code?>');
	$('.demoSource').val($('#demo').html());
});
</script>
</head>
<body>
<? require_once(ROOT.'/public/head.php'); ?>
<div id="nav">
	<div id="nav_path">
		&nbsp;<a href="<?=$LP?>">Home</a>
		&gt;
		<a href="<?=$LP?>mac/js">Javascript</a>
		&gt;
		<a href="<?=$LP?>mac/js/tabs">JQuery MagicTabs</a>
		&gt;
		<?=$MsgJs[$code.'Tabs']?>
	</div>
	<div id="nav_back">
		<a href="/mac/js/tabs/doc" target="_blank"><?=$Msg['app']['doc']?></a>
		|
		<a href="javascript:history.back()"><?=$Msg['back']?></a>
		|
		<a href="<?=$LP?>mac/js#tabs"><?=$Msg['download']?></a>
		|
		<select id="nav_jump">
			<option value="basic"><?=$MsgJs['basicTabs']?></option>
			<option value="remote"><?=$MsgJs['remoteTabs']?></option>
			<option value="custom"><?=$MsgJs['customTabs']?></option>
			<option value="ctxMenu"><?=$MsgJs['ctxMenuTabs']?></option>
		</select>
		&nbsp;&nbsp;
	</div>
	<div class="clear"></div>
</div>
<div class="demoInfo">
	<h2 class="demoTitle"><?=$MsgJs[$code.'Tabs']?></h2>
</div>
<div id="demo" class="demoPanel"><? include_once($code.'.php'); ?></div>
<textarea class="demoSource" wrap="off"></textarea>
<iframe src="/mac/js/related.php" class="related"></iframe>
<? require_once(ROOT.'/public/foot.html'); ?>
</body>
</html>
<?
$fp = ROOT.$LP.'/mac/js/tabs/';
if($code=='basic')
	output(basename(__FILE__), $fp.'index.html');
output(basename(__FILE__), $fp.$code.'.html');
?>